<template>
  <view class="nodata tac colorb2">
    <server-image
      v-if="nullName != ''"
      class="shop_null mg36a disb"
      :style="classStyle"
      :name="nullName"
      mode="aspectFill"
    >
    </server-image>
    <slot name="title"></slot>
    <view class="tac tittle-h24 fs24 color80" :style="'color:' + titleColor">
      {{ title ? title : '暂无数据' }}
    </view>
    <slot name="click-title"></slot>
  </view>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: '',
    },
    nullName: {
      type: String,
      default: 'img/noData.png',
    },
    classStyle: {
      type: [Object, String],
      default: () => {
        '213rpx';
        '182rpx';
      },
    },
    titleColor: {
      type: String,
      default: '',
    },
  },
  data() {
    return {};
  },
};
</script>

<style lang="less" scoped>
.nodata {
  .shop_null {
    width: 213rpx;
    height: 182rpx;
  }
}
</style>
